<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
         //1. Object.is 判断两个值是否完全相等

            console.log(Object.is(122,122)) // true
            console.log(Object.is(NaN, NaN)) // true
            console.log(NaN === NaN) // false


         //2. Object.assign 对象的合并 属性一样的覆盖 不一样的添加合并
            const c1 = {
                name:'asd',
                age:19,
                sex:'1'
            }

            const c2 = {
                uu:'xxx',
                bb:'aaa'
            }
            Object.assign(c2,c1)
            console.log(c2)
            console.log(c1)

         //3. Object.setPrototypeOf 设置原型对象 Object.getPrototypeOf
        
            const school = {
                name: '111'
            }
            const city = {
                name:[1,23,4,5]
            }
            Object.setPrototypeOf(school, city)
            console.log(school)
            console.log(Object.getPrototypeOf(school))
    </script>
</body>
</html>